find count number of occurrence of given substring in python program